package com.example.cloudprovider.controller;

import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Project: spring-cloud
 * @Package: com.example.cloudcustomer.controller
 * @Author: 壹陸捌
 * @Time: 2025 - 08 - 04 18 : 00
 * @Description: 服务消费方
 */
@RestController
public class ProviderController {

    @RequestMapping(value="/selectProvider/{mark}", method = RequestMethod.GET)
    public String selectProvider(@PathVariable("mark") String mark) throws Exception {
        if ("0".equals(mark)) {
            System.out.println("服务提供方被调用失败！！！");
            throw new Exception();
        }
        System.out.println("服务提供方被调用成功");
        return "服务提供方被调用成功";
    }

}
